<?php

class composersmodule_config {
	function form($object) {

		if (!defined('SYS_FORMS')) require_once(BASE.'subsystems/forms.php');
		exponent_forms_initialize();

		$form = new form();
		if (!isset($object->id)) {
			$object->composer_type = 0;
			$object->item_per_page=10;
			$object->image_collection=0;
		} else {
			$form->meta('id',$object->id);
		}
    $composer_type[0]='Christian';
    $composer_type[1]='Others';
		$form->register('composer_type',"Composer Type",new dropdowncontrol($object->composer_type,$composer_type));
		$form->register('item_per_page',"Item per page",new textcontrol($object->item_per_page));
		$form->register('image_collection',"File Collection",new file_collection_control($object->image_collection));
		$form->register('submit','',new buttongroupcontrol("Save",'',"Cancel"));
		return $form;
	}

	function update($values,$object) {

		$object->composer_type = $values['composer_type'];
		$object->item_per_page = $values['item_per_page'];
    $object->image_collection = $values['image_collection'];
		return $object;
	}
}

?>